<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditSupplyTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <p:panelGrid columns="2">
                     <f:facet name="header">
                        <h:outputText value="Fornecedor" />
                    </f:facet>
                    <f:facet name="footer" >
                        <h:outputText value="WebApplication  "   />  <p:commandButton action="#{supplyController.update()}" value="#{bundle.CreateSupplySaveLink}" />
                    </f:facet>
                    
                    <h:outputLabel value="#{bundle.EditSupplyLabel_numer}" for="numer" />
                    <h:inputText id="numer" value="#{supplyController.selected.numer}" title="#{bundle.EditSupplyTitle_numer}" />
                    <h:outputLabel value="#{bundle.EditSupplyLabel_address}" for="address" />
                    <h:selectOneMenu id="address" value="#{supplyController.selected.address}" title="#{bundle.EditSupplyTitle_address}" >
                        <f:selectItems value="#{addressController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditSupplyLabel_name}" for="name" />
                    <h:inputText id="name" value="#{supplyController.selected.name}" title="#{bundle.EditSupplyTitle_name}" />
                    <h:outputLabel value="#{bundle.EditSupplyLabel_ID}" for="ID" />
                    <h:inputText id="ID" value="#{supplyController.selected.ID}" title="#{bundle.EditSupplyTitle_ID}" />
                </p:panelGrid>
               
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditSupplyViewLink}"/>
                <br />
                <h:commandLink action="#{supplyController.prepareList}" value="#{bundle.EditSupplyShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/home" value="#{bundle.EditSupplyIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
